package test;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.junit.Test;

import beans.Follow;
import beans.PersonInformation;
import beans.Searcher;
import beans.Story;
import dao.FollowDao;
import daoIpmt.FollowDaoIpmt;
import daoIpmt.SearchByUsernameIpmt;
import daoIpmt.SearchIpmt;
import daoIpmt.StoryDaoIpmt;
import service.FollowService;
import serviceimpl.FollowServiceIpmt;

public class test02 {
	@Test
	public void test01() {
		StoryDaoIpmt story = new StoryDaoIpmt();
		List<Story> storys = story.getAllStory();
		System.out.println(storys);
	}
	@Test
	public void test02() {
		Searcher searcher = new Searcher();
		searcher.setCity("浙江");
		searcher.setDateStart("2019-8-1");
		searcher.setDateEnd("2019-8-20");
		searcher.setHigh("170~175");
		searcher.setIncome("2000~5000");
		searcher.setMarital("single");
		searcher.setSex("f");
		SearchIpmt search = new SearchIpmt();
		List<PersonInformation> list = search.findMemberBySearch(searcher);
	}
	@Test
	public void test03() {
		Date date =new Date();
		SimpleDateFormat format = new SimpleDateFormat("yyyy");
		String str = format.format(date);
		System.out.println(str);
	}
	@Test
	public void test04() {
		SearchByUsernameIpmt ipmt = new SearchByUsernameIpmt();
		List<PersonInformation> list = ipmt.searchByUsername("张");
		System.out.println(list);
	}
	@Test
	public void test05() {
		Follow follow = new Follow();
		follow.setUsername("aa");
		follow.setFollowusername("11");
		
		FollowService fs = new FollowServiceIpmt();
		fs.addFollow(follow);
		
	}
}
